package jdk8的特性.Stream.查找和匹配;

import java.util.ArrayList;
import java.util.List;

/**
 * 模拟创建多个user的集合
 * @author idea
 * @data 2018/9/8
 */
public class MockDB {

    public static List<User> mockUserList(int i){
        List<User> userList=new ArrayList<>();
        for(int j=0;j<i;j++){
            User user;
            if(j%2==1) {
                user = new User(j, "female", 1, 12);
            }else{
                user = new User(j, "male", 0, 10);
            }
            userList.add(user);
        }
        return userList;
    }
}
